<?php

/**
 * Closedcash form base class.
 *
 * @package    tvpv
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseClosedcashForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'money'        => new sfWidgetFormInputHidden(),
      'host'         => new sfWidgetFormInput(),
      'hostsequence' => new sfWidgetFormInput(),
      'datestart'    => new sfWidgetFormDateTime(),
      'dateend'      => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'money'        => new sfValidatorPropelChoice(array('model' => 'Closedcash', 'column' => 'money', 'required' => false)),
      'host'         => new sfValidatorString(array('max_length' => 255)),
      'hostsequence' => new sfValidatorInteger(),
      'datestart'    => new sfValidatorDateTime(),
      'dateend'      => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->validatorSchema->setPostValidator(
      new sfValidatorPropelUnique(array('model' => 'Closedcash', 'column' => array('host', 'hostsequence')))
    );

    $this->widgetSchema->setNameFormat('closedcash[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Closedcash';
  }


}
